import request from '@/utils/request'

export function scanNow(data) {
    return request({
        url: '/hosts/scan/now',
        method: 'post',
        data
    })
}

export function getScanSetting() {
    return request({
        url: '/scan/currentSet',
        method: 'get'
    })
}

export function setScanSetting(data) {
    return request({
        url: '/scan/set',
        method: 'post',
        data
    })
}

export function deleteHost(data) {
    return request({
        url: '/scan/delHost',
        method: 'delete',
        data
    })
}

export function addHost(data) {
    return request({
        url: '/scan/addHost',
        method: 'post',
        data
    })
}

export function getBlackList(data) {
    return request({
        url: '/scan/blacklist',
        method: 'get',
        params: data
    })
}


export function getScanSetList(data) {
    return request({
        url: '/scan/getScanSetList',
        method: 'get',
        params: data
    })
}

export function createScanSetList(data) {
    return request({
        url: '/scan/createScanSet',
        method: 'post',
        data
    })
}

export function getBatchsList(data) {
    return request({
        url: '/scan/getBatchsList',
        method: 'get',
        params: data
    })
}

export function getHostIpList(data) {
    return request({
        url: '/scan/getHostIpList',
        method: 'get',
        params: data
    })
}

export function updateScanSet(data) {
    return request({
        url: '/scan/updateScanSet',
        method: 'post',
        data
    })
}

export function deleteScanSet(id) {
    return request({
        url: `/scan/deleteScanSet/${id}`,
        method: 'post',
    })
}

export function getScanSetDetails(id) {
    return request({
        url: `/scan/getScanSetDetails/${id}`,
        method: 'post',
    })
}
